//
//  SNHViewController.m
//  SNHEventKit
//
//  Created by chenjianlei on 06/22/2018.
//  Copyright (c) 2018 chenjianlei. All rights reserved.
//

#import "SNHViewController.h"
#import "Second.h"

@interface SNHViewController ()<SNHEventDelegate>

@end

@implementation SNHViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    Second *vc = [[Second alloc] initWithDelegate:self];
    [self presentViewController:vc animated:YES completion:nil];
}

- (void)onActionEvent:(SNHEvent *)event {
    if ([event.eventName isEqualToString:KSNHEventNameLiveModuleStart]) {
        NSLog(@"%@",event.params);
    } else if ([event.eventName isEqualToString:KSNHEventNameLiveModuleEnd]) {
        NSLog(@"%@",event.params);
    }
}

@end
